<?php
class SearchTag extends BaseModel
{
	public $res;
	public $expire;
	public function getSource()
    {
        return "f_search_tag";
    }
	public function initialize()
	{
		 parent::initialize();
	     $this->res['res']=false;
		 $this->expire=60*60*20;
	}

    public function getList(){
		$a['conditions'] = 'is_show=0';
		$a['order'] = 'sort asc';
        $listObj = $this::find($a);
        if($listObj){
            $result = array();
            foreach ($listObj->toArray() as $val){
                $route=[
                    'type' => $val['type'],
                    'path' => $val['app_path'],
                    'is_tb_atuh' => 0,
                    'is_need_login' => 0,
                    'title' => $val['title'],
                    'url' => $val['url'],
                    'data' => $val['app_path'],
                    'notice' => null,
                ];
                $temp['title'] = $val['title'];
                $temp['icon'] = $val['icon'];
                $temp['route'] = $route;
                $result[] = $temp;
            }
            return $result;
        }
        return array();
    }




}
